namespace SqlWebAdmin
{
    using System;
    using System.Data;
    using System.Drawing;
    using System.Web;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;

    public partial  class ServerToolbar : System.Web.UI.UserControl
    {
        
        private string selected = "";

        public string Selected 
        {
            get 
            {
                return selected;
            }
            set 
            {
                selected = value.ToLower();
            }
        }

        public ServerToolbar()
        {
            this.Init += new System.EventHandler(Page_Init);
        }

        protected void Page_Load(object sender, System.EventArgs e)
        {
            DatabasesHyperLink.NavigateUrl = "../databases.aspx";
            ImportHyperLink.NavigateUrl    = "../import.aspx";
            ExportHyperLink.NavigateUrl    = "../export.aspx";
            
            switch(selected) 
            {
                case "databases" :
                    DatabasesTd.Attributes["class"] = "selectedLink";
                    DatabasesHyperLink.Attributes.Remove("onMouseOver");
                    break;
                case "import" :
                    ImportTd.Attributes["class"] = "selectedLink";
                    ImportHyperLink.Attributes.Remove("onMouseOver");
                    break;
                case "export" :
                    ExportTd.Attributes["class"] = "selectedLink";
                    ExportHyperLink.Attributes.Remove("onMouseOver");
                    break;
            }
        }

        protected void Page_Init(object sender, EventArgs e)
        {
            InitializeComponent();
        }

        #region Web Form Designer generated code
           private void InitializeComponent()
        {

        }
        #endregion
    }
}
